
import request from '@/utils/request'

export function createConfigTab (data:any) {
    return request({
        url: 'system.config_tab/create',
        method: 'POST',
       data
    })
 }

 export function getConfigTabSelectTree(params:any) {
    return request({
        url: 'system.config_tab/getSelectTree',
        method: 'GET',
        params
    })
}

export function getConfigTabDetail (params:{id:number|string}) {
    return request({
        url: `system.config_tab/detail`,
        method: 'GET',
        params
    })
}

export function getConfigTabList (params:any) {
    return request({
        url: 'system.config_tab/list',
        method: 'GET',
        params
    })
}

export function updateConfigTab (data:any) {
    return request({
        url: `system.config_tab/update`,
        method: 'PUT',
        data
    })
}

export function updateStatusConfigTab (data:{id:number|string,status:number|string}) {
    return request({
        url: `system.config_tab/status`,
        method: 'PUT',
        data
    })
}

export function delConfigTab (data:{id:number|string}) {
    return request({
        url: `system.config_tab/delete`,
        method: 'DELETE',
        data
    })
}

// 配置列表

export function getConfigList (params:any) {
    return request({
        url: 'system.config/list',
        method: 'GET',
        params
    })
}
export function getConfigDetail (params:any) {
    return request({
        url: 'system.config/detail',
        method: 'GET',
        params
    })
}


export function createConfig (data:any) {
    return request({
        url: 'system.config/create',
        method: 'POST',
       data
    })
 }

 export function updateConfig (data:any) {
     return request({
         url: `system.config/update`,
         method: 'PUT',
         data
     })
 }

 export function updateStatusConfig (data:{id:number|string,status:number|string}) {
     return request({
         url: `system.config/status`,
         method: 'PUT',
         data
     })
 }
 export function delConfig (data:{id:number|string}) {
     return request({
         url: `system.config/delete`,
         method: 'DELETE',
         data
     })
 }
 